<!DOCTYPE html>
<html lang="en">
<head>
    <{include file="header.html"}>
    <title>网校管理-<{$user_data['school_name']}>-德安信会计在线教育平台</title>
</head>
<body>
<div class="wrap">
    <!--star left-->
    <div class="column">
        <{include file="left_menu.html"}>
    </div>
    <div id="ContMianBox">
       <!--star子栏目-->
            <{include file="left_menu_min.html"}>
        <!--end子栏目-->
        <!--end left-->
        <div class="container narrow">
            <!--star conter-->
            <div class="cetContent">
                <div class="tit p-lr20">
                    <span><a href="/school">导航设置</a></span>
                    <!-- <span><a href="/school/info">基本资料</a></span> -->
                    <span><a href="/school/modulars">首页模块设置</a></span>
                    <span><a href="/advertising">网校Banner</a></span>
                    <span class="curr"><a href="/school_page">网校页面</a></span>
                    <span><a href="/school/wx_pay_config">微信支付设置</a></span>
                </div>
                <!--star内容区域-->
                <div class="mainScroll">
                    <div class="mainContainer line-all">
                        <!--star tabMainCont-->
                        <div class="tabMainCont">
                            <form class="layui-form layui-form-pane" method="post" enctype="multipart/form-data" action="/school_page/save">
                                <input type="hidden" name="id" value="<{$info['id']|default:"0"}>" />

                                <div class="layui-form-item">
                                    <label class="layui-form-label">页面类型</label>
                                    <div class="layui-input-block">
                                        <select name="type" lay-filter="type" id="type" <{if $info['type']|default:"0" > 0}>readonly<{/if}>>
                                            <option value="1" <{if $info['type']|default:"0" == 1}>selected<{/if}>>内部页面</option>
                                            <option value="2" <{if $info['type']|default:"0" == 2}>selected<{/if}>>外部页面</option>
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <label class="layui-form-label">页面标题</label>
                                    <div class="layui-input-block">
                                        <input type="text" id="ad_name" name="page_title" value="<{$info.page_title|default:''}>" lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>

                                <div id="url_box" <{if $info['type']|default:"0" != 2}>style="display:none;"<{/if}>>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">URL</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="url" value="<{$info.url|default:''}>" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>

                                <div id="content_box" <{if $info['type']|default:"0" == 2}>style="display:none;"<{/if}>>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">SEO Tag</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="page_tags" value="<{$info.page_tags|default:''}>" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>

                                    <div class="layui-form-item layui-form-text">
                                        <label class="layui-form-label">页面内容</label>
                                        <div class="layui-input-block">
                                            <textarea class="layui-textarea layui-hide editor" name="content" id="editor1"><{$info.content|default:""}></textarea>
                                        </div>
                                    </div>
                                </div>

                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">排序</label>
                                        <div class="layui-input-block">
                                            <input type="text" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" name="sort" value="<{$info.sort|default:'0'}>" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">是否启用</label>
                                        <div class="layui-input-block">
                                            <{assign var="status" value=$info['status']|default:"1"}>
                                            <input type="checkbox" <{if $status == 1}> checked<{/if}> name="status" lay-skin="switch" lay-filter="switchTest" value="1" >
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">设为导航</label>
                                        <div class="layui-input-block">
                                            <{assign var="show_menu" value=$info['show_menu']|default:"0"}>
                                            <input type="checkbox" <{if $show_menu == 1}> checked<{/if}> name="show_menu" lay-skin="switch" lay-filter="switchTest" value="1" >
                                        </div>
                                    </div>
                                </div>

                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">页面描述</label>
                                    <div class="layui-input-block">
                                        <textarea class="layui-textarea" name="page_intro"><{$info.page_intro|default:""}></textarea>
                                    </div>
                                </div>

                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                </div>

                            </form>

                        </div>
                        <!--star会员管理-->
                    </div>
                        <!--end tabMainCont-->
                </div>

            </div>
        </div>

    </div>
</div>
<{include file="footer.html"}>
<script>
    layui.use(['form', 'jquery'], function(){
        var form = layui.form(),$ = layui.jquery;
        form.on('select(type)', function(data){
            var type = $(data.elem).val();
            if(type == 1){
                $("#content_box").show();
                $("#url_box").hide();
            }else{
                $("#content_box").hide();
                $("#url_box").show();
            }
        });
    });
</script>
</body>
</html>